﻿<?php
$cur_page = basename($_SERVER['SCRIPT_NAME'], '.php');
$title_page = ucwords($cur_page);
if ($cur_page == 'index') {
    $title_page = 'Login quản trị';
}

//Chuyển định dạng tiền
function formatMoney($number, $fractional = false) {
    if ($fractional) {
        $number = sprintf('%.2f', $number);
    }
    while (true) {
        $replaced = preg_replace('/(-?\d+)(\d\d\d)/', '$1,$2', $number);
        if ($replaced != $number) {
            $number = $replaced;
        } else {
            break;
        }
    }
    return $number;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link rel="stylesheet" type="text/css" href="design/css/default.css" />
        <link rel='stylesheet' type='text/css' href='../css/colorbox.css' />
        <title><?php echo $title_page; ?></title>
        <script type='text/javascript' src='../javascript/jquery-min-1.7.1.js'></script>
        <script type='text/javascript' src='../javascript/jquery.colorbox.js'></script>
        <script type="text/javascript">
            $(document).ready(function() {
                //Examples of how to assign the ColorBox event to elements
                $(".ajax").colorbox();

                //Example of preserving a JavaScript event for inline calls.
                $("#click").click(function() {
                    $('#click').css({'background-color': '#f00', 'color': '#fff', 'cursor': 'inherit'}).text('Open this window again and this message will still be here.');
                    return false;
                });
            });
            function onDel(_dr) {
                if (confirm("Bạn có chắc chắn muốn xóa?")) {
                    window.location.href = _dr;
                }
            }
        </script>
    </head>

    <body>
        <div class="wapper">
            <div class="header">
                <div id="logo"><img src="design/image/logo.png" /></div>
            </div>
